Skip to content

Fix the single file merge command #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisandreae
Copy link
Member

It hadn't ever been used, and didn't work

It hadn't ever been used, and didn't work
@@ -239,15 +239,14 @@ class PhraseAppUpdaterCLI < Thor
validate_readable_file!('ancestor', ancestor)
validate_readable_file!('ours', ours)
validate_readable_file!('theirs', theirs)
validate_writable_file!('to', to)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge function uses

    result_path = options[:to]
    validate_writable_path!('to', result_path)

It seems nice to be be consistent, and also preserve the writable file check.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate_writable_path! is perhaps misnamed, because it validates that it's an existing writable directory, which isn't helpful here. validate_writable_file! wouldn't be desirable either, because it likewise validates that it's an existing writable file.

What we'd ideally want here is validation that it's a path that could be written to (i.e. either a writable file or no existing file in a writable directory), which is something we haven't added to our library of helper function yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants